//
//  ZBOneSendMessageModel.m
//  BaseRACDemo
//
//  Created by 庄波 on 2018/3/28.
//  Copyright © 2018年 庄波. All rights reserved.
//

#import "ZBOneSendMessageModel.h"
#import "ZBHTTPService+ResultData.h"
@implementation ZBOneSendMessageModel

- (void)initialize{
    [super initialize];
    self.title = @"群发通知";
    
    RACCommand *tempCommond = [[RACCommand alloc] initWithSignalBlock:^RACSignal * _Nonnull(id  _Nullable input) {
        RACSignal *single = [[self.services.client getTemplatewithToken:input] map:^id _Nullable(id  _Nullable value) {
            return value;
        }];
        return single;
    }];
    
    self.templateCommand = tempCommond;
    //绑定数据
    RAC(self,textStr) = self.templateCommand.executionSignals.switchToLatest ;
    
    /// 过滤错误信息
    [self.templateCommand.errors subscribe:self.errors];
}

@end
